package edu.ccut.saturn.basecomponent.database.impl.oracle;

import edu.ccut.saturn.basecomponent.database.IDatabaseAttribute;

public class OracleAttribute implements IDatabaseAttribute {
	public static final String BINARY_DOUBLE = "BINARY_DOUBLE";
	public static final String BINARY_FLOAT = "BINARY_FLOAT";
	public static final String BLOB = "BLOB";
	public static final String CLOB = "CLOB";
	public static final String CHAR = "CHAR";
	public static final String DATE = "DATE";
	public static final String INTERVAL_DAY_TO_SECOND = "INTERVAL_DAY_TO_SECOND";
	public static final String INTERVAL_YEAR_TO_MONTH = "INTERVAL_YEAR_TO_MONTH";
	public static final String LONG = "LONG";
	public static final String LONG_RAW = "LONG_RAW";
	public static final String NCLOB = "NCLOB";
	public static final String NUMBER = "NUMBER";
	public static final String NVARCHAR2 = "NVARCHAR2";
	public static final String RAW = "RAW";
	public static final String TIMESTAMP = "TIMESTAMP";
	public static final String TIMESTAMP_WITH_LOCAL_TIME_ZONE = "TIMESTAMP_WITH_LOCAL_TIME_ZONE";
	public static final String TIMESTAMP_WITH_TIME_ZONE = "TIMESTAMP_WITH_TIME_ZONE";
	public static final String VARCHAR2 = "VARCHAR2";

	/**
	 * 是否是数字类型
	 * 
	 * @return
	 */
	public boolean isNumber(String type) {
		if (NUMBER.equals(type)) {
			return true;
		}
		return false;
	}

	/**
	 * 是否是大数据类型
	 * 
	 * @param type
	 * @return
	 */
	public boolean isLOB(String type) {
		if (BLOB.equals(type) || CLOB.equals(type)) {
			return true;
		}
		return false;
	}
}
